Skip to content

[EMCAL] Modernize EMCal code#15600

Draft
mhemmer-cern wants to merge 3 commits into
AliceO2Group:devfrom
mhemmer-cern:emcal
Draft

[EMCAL] Modernize EMCal code#15600
mhemmer-cern wants to merge 3 commits into
AliceO2Group:devfrom
mhemmer-cern:emcal

Conversation

@mhemmer-cern

Copy link
Copy Markdown
Contributor

Modernize EMCal code: EMCALBase/Geometry and ClusterFactory Classes and DataFormatsEMCAL classes:

  • Marking functions as no discard when the return type is not void
  • Switching from gsl::span to std::span to use official stl container
  • Removal of unused includes
  • Ensuring initialization of all members
  • Switching from C-style arrays to either std::array or std::span
  • Removing else after return statements
  • Merging of switch and if statements that had the same body

In Cell.cxx add new function unpackV0 to unpack/decode the bitfields. Previously we just reinterpret_cast<const DecodingV0::CellDataPacked*> some const char* variable which violate type safety. Now it uses memcpy to safely copy the data from the buffer into the new DecodingV0::CellDataPacked object.

Fix return type for getCoreRadius (was bool should be float) and argument type for setUseWeightExotic(float useWeightExotic which should be setUseWeightExotic(bool useWeightExotic).

Removes streaming of spans from ROOT IO in ClusterFactory, since they are non owing spans.

Fixed some argument name differences between the definition and implementation of some functions.

mhemmer-cern and others added 2 commits July 15, 2026 13:33
- Moderinze EMCal code: EMCALBase/Geometry and ClusterFactory Classes and DataFormatsEMCAL classes, removing c-style arrays
- Fixing clang-tidy warnings and errors that would appear when using the O2Physics clang-tidy settings
- Switching from gsl::span to std::span to use official stl container

[EMCAL] update
Please consider the following formatting changes to AliceO2Group#15600
@mhemmer-cern

Copy link
Copy Markdown
Contributor Author

This might also be a good time to think which classes we really need to write into ROOT files. For example, I do not think that the ClusterFactory should be written to ROOT files, but maybe I am overlooking something.
Removing the ROOT dependencies and dictionary generation could be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants